Queuing applications may use messaging features to allow a producer of information to communicate with a consumer of information. In such queuing applications, a producer of information may generate a message and place it into a message queue. A consumer of information may access the message by performing a browse operation. When the message is no longer useful, a dequeue operation may be used to remove it from the queue.
A user may specify an amount of memory to be used by the queuing application. Messages may be stored in this dedicated memory whenever possible. However, memory in such systems may be limited. If there is not enough memory for the queuing operation, some messages may be stored on disk rather than in memory. In many systems, when the memory is full and a new message must be enqueued, the oldest message in memory is written to disk and the new message is stored in memory.
Storing a message onto disk may be referred to as “spilling” the message onto disk, and browsing or dequeuing a message on disk may be referred to as “unspilling” the message.
Reading and writing to memory may be time-consuming and costly. For this reason, it is advantageous to reduce spill and unspill count, or the number of spills and unspills. Reducing the spill and unspill count may be achieved by allocating more memory to the queuing application. However, this may negatively affect the performance of other applications in the system.
Users may therefore weigh competing factors in determining how much memory to allocate to the messaging application and to other applications in the system. Often, users do not have enough information to determine an appropriate amount of memory to allocate for the messaging application.
What is needed, therefore, is a solution that overcomes these and other shortcomings of the prior art.